All MIDI information is in blocks, each consisting of a Status Byte — really a MIDI command — followed by the appropriate number of Data Bytes.
Any byte with a value equal to or greater than 128 (hex 80) is a Status Byte. The most significant nibble conveys the ‘command’ — such as Note On.
Additional data, such as the MIDI Channel Number, is usually carried in the least significant nibble and in subsequent Data Bytes. There are 128 kinds of Status Byte: from 128 (hex 80) to 255 (hex FF).
Any byte with a value of 127 (hex 7F) or less is a Data Byte. It transmits supplementary information associated with Status Bytes — such as Note Number or Key Velocity.
Channel Messages
wwwwwwwww
Every instrument in a MIDI system will have one or more Channel Numbers — within the range 1 to 16. This numbering allows sequencers and other devices to direct their information to a particular instrument (or voice within an instrument) by means of a Channel Message.
In most instances the user is free to assign any voice to any Channel Number. Some equipment — usually of the General MIDI (GM) variety — may assign sounds automatically.
Simple instruments may only ‘sound’ one voice at a time — hence they only need one MIDI channel. But multi-timbral machines can ‘sound’ any number of voices at once — they can use as many channels as can be assigned to voices. The lowest numbered MIDI channel is then called the Basic Channel — this is used to convey information which is not specific to a voice.
Channel Messages are divided into Channel Voice Messages and Channel Mode Messages:
Channel Voice Messages — the Basics
wwwwwwwwwwwwwwwwww
 
Channel Voice Messages control the
instrument’s voices — only instruments or
voices assigned to the appropriate MIDI
channel will respond.
Running Status may be used to reduce the number of bytes needed to convey this information. This improves speed, which is rather crucial for musical timing! It allows a string of data bytes to follow a single status byte without any other status bytes being sent. The Note On status byte may be followed by any number of note on or note off data bytes — the latter are actually note on bytes with their velocity (the pressure applied to a key) set to zero.
Voices may respond in one of several Modes:-
Monophonic Mode (Mono): only one sound is triggered via a single MIDI channel — no further sounds will play until the first has ceased. This unusual mode may appear on analogue instruments fitted with MIDI converters.
Omniphonic Mode (Omni): only one sound can be triggered by each MIDI channel — ‘polyphony’ requires several channels, so this mode is rare.
Polyphonic Mode (Poly): multiple sounds, usually with the same voice, are triggered from a single MIDI channel — the usual mode for modern machines.
This Basic Channel may default to channel 1 or may be selected by the master controls on the instrument.
Some devices may need to be switched to Multi mode in order to use the Basic Channel.
The MIDI standard specifies that instruments should default to Poly mode with Omni on. That means it should be able to receive via any MIDI channel and also able to play polyphonically from any channel. In practice most devices are polyphonic, but only receive from selected channels.
„ Nphony indicates how many sounds an instrument can play simultaneously
— exceeding this number will cause voices to truncate (usually on the
basis of first in, first out).
„ Not all drum machines provide pitched sounds — different sounds may be
played by different notes on the controlling MIDI keyboard.
„ Whilst recording a sequence the musician must be able to hear it!
Inevitably the keyboard is on a different MIDI channel to the instrument.
Hence many sequencers will replace the channel number in the keyboard
Voice Messages by that of the instrument — this is called Auto-channelising.
Channel Voice Messages — in Detail
wwwwwwwwwwwwwwwww
 
Channel Voice Messages contain the MIDI
channel within the status byte.
All messages, except Channel Pressure, use
two data bytes, the first specifying the note
number, the second indicating key-pressure
or velocity.
The Channel Voice messages are:-
Note Off: a key (note) has been released.
The second data byte indicates the speed of release (off velocity) and is rarely used.
Note On (with running status): a key (note) has been pressed.
The second data byte, giving the applied pressure (on velocity) should use a log scale.
Polyphonic Key Pressure or After Touch: pressure has been applied to an individual key. This is rarely used.
Channel Pressure (After Touch): pressure has been applied to the keyboard.
This is often used in preference to Poly Key Pressure. It is not specific to any particular key being pressed and uses a single data byte to convey the pressure data.
Channel Mode Messages
wwwwwwwwwwww
 
Channel Mode Messages tell an instrument
how to respond to Voice Messages — they are
sent over the instrument’s Basic Channel.
For devices which respond to notes on any
number of MIDI channels this will usually
be the lowest numbered channel.
Mode messages may be used to control a ‘common’ parameters in a device — such as volume. Although most devices only use one Basic Channel it is quite feasible to use two or more - allowing an instrument to behave as two or more separate synthesisers, or to expand the range of controls available via MIDI.
The messages are:-
Control Change (with running status): a controller or switch has moved.
Four data bytes are used to specify any one of 64 continuous controllers (14-bit) and 36 switches.
The following controllers are permanently assigned —
Breath controller (1), foot pedal (4), portamento time control (5), data entry slider (6) and main volume (7). Note that earlier instruments may confuse (4) and (7)!
The last 4 switches are used for sustain, portamento, sostenuto and soft pedals.
There are also another 28 controllers (7-bit), data increment and decrement buttons, two parameter controllers (14-bit), controllers reset switch, local control switch (to separate an instrument from its own keyboard) and switches to set the Mode or to send an All Notes Off command.
The 14-bit controller values are split into most and least significant bytes, using a log scale. They can be used in a non-standard form for mixing console automation — the maximum capacity is 64 7-bit faders (with 0.8 dB resolution) or 32 14-bit faders, plus switches
Program Change: a voice or patch has been selected. A single data byte carries the program number.
Pitch Bend Change: the bend controller has moved. Two data bytes are used to convey the 14-bit data — the least significant byte (LSB) is sent first.
System Common Messages
wwwwwwwwwwwww
 
System Common Messages are sent and
received irrespective of MIDI channels.
They are designed to be received by all
devices in a MIDI system — assuming
they can make use of them!
The System Common Messages are:-
MIDI Timecode (MTC) Quarter Frame Message: the current position of SMPTE timecode. 100 messages are sent per second, using only 7.5% of MIDI bandwidth. Timecode is contained in a data byte spread over 8 messages — hence a full update only occurs on every second frame of timecode.
Song Position Pointer: a count of MIDI beats elapsed as a sequencer plays its song. Two data bytes are used — the least significant byte (LSB) is sent first.
Song Select: selects the song to be played by a sequencer. A single data byte conveys the song number.
Tuning Request: This is rarely used.
End of System Exclusive (EOX): the System Exclusive data has ended.
See below.
Real Time Messages
wwwwwwwwww
  Real Time Messages are sent and received
irrespective of MIDI channels and have the
highest timing priority.
They can be interposed between any bytes,
perhaps separating status bytes from their
data, or even placed in the middle of
running status information.
Real Time Messages do not contain data
bytes.
The messages are:-
Timing Clock: these ‘pulses’ drive a sequencer at a rate of six clocks per MIDI Beat. There are 16 Beats or 96 Clocks per whole-note (semi-breve). The Song Position Pointer counts these beats during a sequence.
Start , Stop and Continue: instructions to a sequencer.
Active Sensing: for silencing instruments when MIDI cables are disconnected.
This feature is optional. Any instrument that receives this signal will expect another every 300 milliseconds. If it fails to appear the receiver turns off all voices.
System Reset: all instruments to be restored to normal. This is implemented by the user, but not automatically at ‘power up’.
System Exclusive Messages
wwwwwwwwwwww
  Most System Exclusive Messages are
specific to particular equipment —
the manufacturer determines the
rules. The messages contain a
manufacturer’s identification
number (ID) to match the
appropriate protocol. They are often
used for voice editing or remote
control of synthesisers.
System Exclusive information must be aimed at particular piece of equipment, even when two identical devices share the same MIDI circuit. Hence instruments are assigned a Device ID — this often corresponds to the Basic Channel number.
Two special IDs are used for the Universal System Exclusive messages, available to any device (this feature is not controlled by any one manufacturer!).
The first ID is for messages used to ‘cue’ sequencers or to dump audio samples via MIDI. The latter is a slow process, taking around ten times the duration of the sample.
The second ID indicates MIDI Timecode (MTC) Full Frame or MTC User Bit messages.